package com.whfc.ms.api.emp.service.impl;

import com.whfc.common.result.PageData;
import com.whfc.emp.dto.AppEmpApplyDTO;
import com.whfc.emp.dto.AppEmpApplyNumDTO;
import com.whfc.emp.dto.AppEmpIdentifyDTO;
import com.whfc.emp.param.AppEmpAddParam;
import com.whfc.emp.param.AppEnpApplyCheckParam;
import com.whfc.emp.service.AppEmpService;
import com.whfc.ms.api.emp.service.MsAppEmpApplyService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;

import java.util.Date;

/**
 * @Description 人员审批
 * @Author hw
 * @Date 2021-08-06 9:19
 * @Version 1.0
 */
@Service
public class MsAppEmpApplyServiceImpl implements MsAppEmpApplyService {

    @DubboReference(interfaceClass = AppEmpService.class, version = "1.0.0")
    private AppEmpService appEmpService;


    @Override
    public PageData<AppEmpApplyDTO> list(Integer deptId, Integer checkResult, Date startTime, Date endTime, Integer pageNum, Integer pageSize) {
        return appEmpService.getApplyList(deptId, checkResult, startTime, endTime, pageSize, pageNum);
    }

    @Override
    public AppEmpApplyDTO detail(Integer empId) {
        return appEmpService.getApplyDetail(empId);
    }

    @Override
    public void check(AppEnpApplyCheckParam param) {
        appEmpService.checkApply(param);
    }

    @Override
    public void add(AppEmpAddParam param) {
        appEmpService.empApplyAdd(param);
    }

    @Override
    public AppEmpIdentifyDTO idCardIdentify(String idCardImgUrl, String sessionId) {
        return appEmpService.idCardIdentify(idCardImgUrl, sessionId);
    }

    @Override
    public void del(Integer empId) {
        appEmpService.applyDel(empId);
    }

    @Override
    public AppEmpApplyNumDTO num(Integer deptId, Date startTime, Date endTime) {
        return appEmpService.getApplyNum(deptId, startTime, endTime);
    }
}
